package com.example.newone.mappper;

import com.example.newone.dao.UserDao;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface UserMapper {
//    @Select("select id as id ,parent_id as parentId,title as title,status as status,create_time as createTime from one_tree  ")
    List<UserDao> findUser();


    @Insert("insert into one_tree (parent_id,title,status,create_time) values (#{parentId},#{title},#{status},#{createTime}) ")
    void insertUser(UserDao userDao);


    @Delete("delete from one_tree where id=#{id} ")
    void deleteUser(Long id);

    @Update("update one_tree set title=#{title} where id = #{id}")
    void updateUser(UserDao userDao);
}
